package com.wl.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.wl.dao.EnterpriseDao;
import com.wl.pojo.Enterprise;
import com.wl.service.EnterpriseService;

@Service("enterpriseService")
public class EnterpriseServiceImpl implements EnterpriseService {

	@Resource
	private EnterpriseDao enterpriseDao;

	@Override // 查找所有
	public List<Enterprise> getEntAll() {
		return enterpriseDao.selectEntAll();
	}

	@Override // 根据id查找
	public Enterprise getEntById(int entId) {
		return enterpriseDao.selectEntById(entId);
	}

	@Override // 根据企业名称查找
	public Enterprise getEntByName(String entName) {
		return enterpriseDao.selectEntByName(entName);
	}

	@Override // 添加
	public int addEnt(Enterprise ent) {
		return enterpriseDao.insertEnt(ent);
	}

	@Override // 修改
	public int alterEnt(Enterprise ent) {
		return enterpriseDao.updateEnt(ent);
	}

	@Override // 根据id删除
	public int removeEntById(int entId) {
		return enterpriseDao.deleteEntById(entId);
	}

}
